Skip to content

d3d11: only dirty stages that bind a CB on WRITE_DISCARD map#175

Closed
cyyever wants to merge 1 commit into
3Shain:mainfrom
cyyever:fix-discard-map-dirty-scope
Closed

d3d11: only dirty stages that bind a CB on WRITE_DISCARD map#175
cyyever wants to merge 1 commit into
3Shain:mainfrom
cyyever:fix-discard-map-dirty-scope

Conversation

@cyyever

@cyyever cyyever commented Jun 25, 2026

Copy link
Copy Markdown

WRITE_DISCARD of a dynamic buffer/texture used to dirty every shader stage's CB/SRV set, forcing a redundant argument-table re-encode next draw on stages that never bound it. Now only stages that actually bind the resource are dirtied, on both immediate and deferred contexts.

WRITE_DISCARD of a dynamic buffer/texture used to dirty every shader
stage's CB/SRV set, forcing a redundant argument-table re-encode next
draw on stages that never bound it. Now only stages that actually bind
the resource are dirtied, on both immediate and deferred contexts.
@3Shain

3Shain commented Jun 25, 2026

Copy link
Copy Markdown
Owner

No, nested for loop is totally a no-go. WRITE_DISCARD map should be as cheap as possible (there would be typically a sequence of map before a draw/dispatch). I see redundant stage encoding can be improved but NOT by checking existing bindings.

@3Shain 3Shain closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants